<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        do {
            var uname = prompt('请输入您的用户名');
            var psw = prompt('请输入您的密码');
        }
        while (uname != 'admin' || psw != '123456')
        alert('登陆成功');

        // do {
        //     var msg = prompt('名字');
        //     var pwd = prompt('密码');
        // } while (msg != 'admin' || pwd != '123');
        // alert('登录成功');
    </script>
</head>

<body>

</body>

</html>